/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mappingapitest;
import es.upm.gib.mappingAPI2.*;
//import es.upm.gib.owlbasicmodel2.*;
import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdom2.JDOMException;

/**
 *
 * @author xe38587
 */
public class MappingapiTest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        MappingApi2 test = new MappingApi2();
        try {
            //test.loadMapping("C:\\ObTiMAMapping1_fixed.xml");
            test.loadMapping("C:\\mapping new example dicom (1).xml");
        } catch (JDOMException ex) {
            Logger.getLogger(MappingapiTest.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ParseException ex) {
            Logger.getLogger(MappingapiTest.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(MappingapiTest.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        ArrayList<Entry> listado = new ArrayList<Entry>();
        listado = test.getEntries();
        
        System.out.println(listado.size());
        
        for (int i =0; i<listado.size() ;i++){
        System.out.println(listado.get(i));
        }
        MappingMetadata metadata = new MappingMetadata();
        
        metadata = test.getMetadata();
        
       System.out.println("nombre de la metadata: "+ metadata.getMappingName() );
       
       
       
        
        
    }
    
}
